package system.controller;

/**
 * Created by Administrator on 2017/3/21.
 */
public class MyThread extends Thread {
    ThreadLocal tl;
    public MyThread(ThreadLocal tl){
        this.tl = tl;
    }


    @Override
    public void run() {
        tl.set(this.getName());
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(this.getName()+"--->"+tl.get());
    }
}
